package Classwork;

public class Demo02 {
    private int age;
    public void setAge(int age){
     if (age < 1 || age > 150){
         System.out.println("年龄不符合规定");
     }
     this.age = age;
    }
}
